package com.aliliwu.db_test;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.aliliwu.db_test.services.User_info_service;

@SuppressWarnings("serial")
public class Db_testServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		
		//String sessionKey = req.getParameter("xn_sig_session_key");
		//XiaoneiRestClient client = new XiaoneiRestClient(Config.apiKey,Config.secret,sessionKey);
		
	//	client.setDebug(true);
		
	//	List uids=new ArrayList();
		//uids.add(client.users_getLoggedInUser());
		
	//	testUsersGetInfo(client,uids);
		
		
		
		
		
		
//		Employee emp = new Employee();
//		
//		emp.setAge(23);
//		
//		
//		ContactInfo ci = new ContactInfo();
//		ci.setCity("changsha");
//		ci.setStreetAddress("furonglu");
//		
//		emp.setMyContactInfo(ci);
//		
		//PersistenceManager pm = PMF.get().getPersistenceManager();
//		
//		System.out.print(ci.getCity());
//		System.out.print(ci.getStreetAddress());
//
//		
//		pm.makePersistent(emp);
//		
//		
//		
// 		User_info_entity ui = new User_info_entity();
// 		ui.setName("naqueshi");
// 		
// 		System.out.print(ui.getName());
// 		
// 		pm.makePersistent(ui);
		
		
		resp.setContentType("text/plain");
		

		
		resp.getWriter().println(User_info_service.insertNew(1, "sessionKey", 1, "birthday", "tinyurl", "headurl", "mainurl"));

		resp.getWriter().println("songsong");
		//resp.getWriter().println(ui.getName());
	}

	
}
